package com.itheima01;

public class Getsum {
    public static void main(String[] args) {

        double[] arr = {31.55,42,23.56,64,25,36};

        double sum = getSum(arr);

        System.out.println(sum);
    }

    public static double getSum(double[] arr) {
        double sum = 0;
        for (int i = 0; i < arr.length; i++) {
            sum += arr[i];
        }
        return sum;
    }
}
